home *** CD-ROM | disk | FTP | other *** search
/ Shareware Extravaganza - Disc 4 / Shareware Extravaganza - Over 25,000 Programs (The Ultimate Shareware Company)(Disc 4 of 4)(1993).iso / cad / quikcmd2.zip / ZOOMBACK.LSP < prev   
Text File  |  1990-10-23  |  4KB  |  108 lines

  1. ;  ZOOMBACK.LSP
  2. ;
  3. ;                         QUICK COMMAND version 2.0
  4. ;                   ZOOMBACK.LSP is a module of QUICK COMMAND
  5. ;                        Copyright 1989, 1990 Dan Jincks
  6. ;
  7. ;
  8. ;              This is SHAREWARE, it is NOT Public Domain software.
  9. ;
  10. ;              This code or any part of this code may not be reproduced
  11. ;              in any publication without prior written permission.
  12. ;
  13. ;              Printed copy of this code or any part of this code may not
  14. ;              be distributed without prior written permission.
  15. ;
  16. ;              Printed copy may only be made for reference purposes by
  17. ;              the end user.
  18. ;
  19. ;
  20. ;                               Dan Jincks
  21. ;                             Box 155A HCR 77
  22. ;                           Annapolis, MO 63620
  23. ;
  24. ;
  25. ;
  26. ;   You are granted a limited license to use ZOOMBACK.LSP for a 30 day trial
  27. ;   period.  If you wish to continue using any or all of QUICK COMMAND after
  28. ;   the trial period, you must become a registered user.  As a registered
  29. ;   user, you may use QUICK COMMAND on 1 workstation or terminal.
  30. ;   Additional registrations must be bought for each additional workstation or
  31. ;   terminal.  To become a registered user, fill out the order form that can
  32. ;   be printed out from ORDERQC.DOC .
  33. ;
  34. ;
  35. ;   You may send copies of QUICK COMMAND to friends and associates if you abide
  36. ;   by the following rules:
  37. ;
  38. ;   1. It may only be distributed in the original unmodified form.
  39. ;   2. All original files must be included.
  40. ;   3. No addition files may be added.
  41. ;   4. If other files will be on the same disk, QUICK COMMAND files must be in
  42. ;      a library format such as ".ARC" called "QUICKCMD", or else be put alone
  43. ;      in a subdirectory called "QUICKCMD".
  44. ;   5. You may not sell QUICK COMMAND or any part of it.
  45. ;   6. You are not allowed to charge more then $5 to cover the cost of copying
  46. ;      and distribution.
  47. ;   7. You may not distribute any hard copy of the contents of QUICK COMMAND.
  48. ;
  49. ;
  50. ;   These AutoLISP commands and functions are designed to save you time, and
  51. ;   saving time means saving money.  The registration fee is very modest
  52. ;   compared to the savings, and much less expensive then typical third party
  53. ;   AutoCAD software. Be sure to registar if you continue to use them.
  54. ;
  55. ;
  56. ;                                                               DAN
  57. ;
  58. ;
  59. ;
  60. ;
  61. ;        AutoCAD and AutoLISP are registered trade marks of Autodesk Inc.
  62. ;
  63. ;        ***************************************************************
  64. ;
  65. ;   Begin ZOOMBACK.LSP
  66. ;
  67. (defun C:ZB (/ SCA SCB SCC SCD SCE SCF SCG SCH)
  68.    (setq SCA (getvar "vsmax") SCB (getvar "vsmin"))
  69.    (if (and (> (car SCA)(car SCB))(> (cadr SCA)(cadr SCB)))(progn
  70.       (setq SCG (* (- (car SCA)(car SCB)) 0.001)
  71.             SCH (* (- (cadr SCA)(cadr SCB)) 0.001)
  72.             SCC (- (car SCA) SCG)
  73.             SCD (- (cadr SCA) SCH)
  74.             SCE (+ (car SCB) SCG)
  75.             SCF (+ (cadr SCB) SCH))
  76.    ))
  77.    (if (and (< (car SCA)(car SCB))(> (cadr SCA)(cadr SCB)))(progn
  78.       (setq SCG (* (- (car SCB)(car SCA)) 0.001)
  79.             SCH (* (- (cadr SCA)(cadr SCB)) 0.001)
  80.             SCC (+ (car SCA) SCG)
  81.             SCD (- (cadr SCA) SCH)
  82.             SCE (- (car SCB) SCG)
  83.             SCF (+ (cadr SCB) SCH))
  84.    ))
  85.    (if (and (> (car SCA)(car SCB))(< (cadr SCA)(cadr SCB)))(progn
  86.       (setq SCG (* (- (car SCA)(car SCB)) 0.001)
  87.             SCH (* (- (cadr SCB)(cadr SCA)) 0.001)
  88.             SCC (- (car SCA) SCG)
  89.             SCD (+ (cadr SCA) SCH)
  90.             SCE (+ (car SCB) SCG)
  91.             SCF (- (cadr SCB) SCH))
  92.    ))
  93.    (if (and (< (car SCA)(car SCB))(< (cadr SCA)(cadr SCB)))(progn
  94.       (setq SCG (* (- (car SCB)(car SCA)) 0.001)
  95.             SCH (* (- (cadr SCB)(cadr SCA)) 0.001)
  96.             SCC (+ (car SCA) SCG)
  97.             SCD (+ (cadr SCA) SCH)
  98.             SCE (- (car SCB) SCG)
  99.             SCF (- (cadr SCB) SCH))
  100.    ))
  101.    (if (and SCC SCD SCE SCF)
  102.       (command "ZOOM" "W" (list SCC SCD)(list SCE SCF))
  103.       (prompt " Equal X or Y at corners of screen. Can't zoom.")
  104.    )(princ)
  105. )
  106. ;
  107. ;   End ZOOMBACK.LSP
  108.